var mySwiper = new Swiper('#swiper2', {
  direction: 'horizontal', // 垂直切换选项
  loop: true, // 循环模式选项
  autoplay: true, //
  // 如果需要分页器
  pagination: {
    el: '.swiper-pagination',
  },
})
//随收购轮播   
var swiper = new Swiper("#swiper1", {
  cssMode: true,
  navigation: {
    nextEl: "#next1",
    prevEl: "#prev1",
  },
  pagination: {
    el: ".swiper-pagination",
    clickable: true,
  },
  mousewheel: true,
  keyboard: true,
});

// 楼层跟随
$(window).scroll(function () {
  if ($(window).scrollTop() <= 1000) {
    $(".oli1").addClass("red");
    $(".oli1").siblings().removeClass("red");
  } else if ($(window).scrollTop() > 1000 && $(window).scrollTop() <= 1550) {
    $(".oli2").addClass("red");
    $(".oli2").siblings().removeClass("red");
  } else if ($(window).scrollTop() > 1550 && $(window).scrollTop() <= 2100) {
    $(".oli3").addClass("red");
    $(".oli3").siblings().removeClass("red");
  } else if ($(window).scrollTop() > 2100 && $(window).scrollTop() <= 2650) {
    $(".oli4").addClass("red");
    $(".oli4").siblings().removeClass("red");
  } else if ($(window).scrollTop() > 2650 && $(window).scrollTop() <= 3200) {
    $(".oli5").addClass("red");
    $(".oli5").siblings().removeClass("red");
  } else if ($(window).scrollTop() > 3200 && $(window).scrollTop() <= 3750) {
    $(".oli6").addClass("red");
    $(".oli6").siblings().removeClass("red");
  } else if ($(window).scrollTop() > 3750 && $(window).scrollTop() <= 4300) {
    $(".oli7").addClass("red");
    $(".oli7").siblings().removeClass("red");
  } else if ($(window).scrollTop() > 4300) {
    $(".oli7").removeClass("red");
  }
});

// 点击跳转
$(".oli1").click(function () {
  $("html,body").animate({
    "scrollTop": 551
  })
});
$(".oli2").click(function () {
  $("html,body").animate({
    "scrollTop": 1101
  })
});
$(".oli3").click(function () {
  $("html,body").animate({
    "scrollTop": 1651
  })
});
$(".oli4").click(function () {
  $("html,body").animate({
    "scrollTop": 2201
  })
});
$(".oli5").click(function () {
  $("html,body").animate({
    "scrollTop": 2751
  })
});
$(".oli6").click(function () {
  $("html,body").animate({
    "scrollTop": 3301
  })
});
$(".oli7").click(function () {
  $("html,body").animate({
    "scrollTop": 3851
  })
});


// 回到顶部
$("button").hide();
$(window).scroll(function () {
  if ($(window).scrollTop() >= 500) {
    $("button").show();
  } else {
    $("button").hide();
  }
});
$("button").click(function () {
  $("html,body").animate({
    "scrollTop": 0
  })
});
$(".oli").hide();
$(window).scroll(function () {
  if ($(window).scrollTop() >= 500) {
    $(".oli").show();
  } else {
    $(".oli").hide();
  }
});

$(".oli").mouseover(function () {
  $(this).addClass("hot");
  $(this).siblings().removeClass("hot");
});
$(".oli").mouseout(function () {
  $(this).removeClass("hot");
});

//鼠标移动切换
var ones = document.getElementsByClassName('no1');
var ones2 = document.getElementsByClassName('no2');
var ones3 = document.getElementsByClassName('no3');
var ones4 = document.getElementsByClassName('no4');
var hots = document.getElementsByClassName('hot');
var hots2 = document.getElementsByClassName('hot2');
var hots3 = document.getElementsByClassName('hot3');
var hots4 = document.getElementsByClassName('hot4');
var ones5 = document.getElementsByClassName('no5');
var hots5 = document.getElementsByClassName('hot5');
var ones6 = document.getElementsByClassName('no6');
var hots6 = document.getElementsByClassName('hot6');
ones[0].addEventListener('mouseover', function (e) {
  hots[0].style.display = 'block';
  ones[0].className = 'no1 on'
  hots[1].style.display = 'none';
  ones[1].className = 'no1'
  hots[2].style.display = 'none';
  ones[2].className = 'no1'
  hots[3].style.display = 'none';
  ones[3].className = 'no1'
})
ones[1].addEventListener('mouseover', function (e) {
  hots[0].style.display = 'none';
  ones[0].className = 'no1'
  hots[1].style.display = 'block';
  ones[1].className = 'no1 on'
  hots[2].style.display = 'none';
  ones[2].className = 'no1'
  hots[3].style.display = 'none';
  ones[3].className = 'no1'
})
ones[2].addEventListener('mouseover', function (e) {
  hots[0].style.display = 'none';
  ones[0].className = 'no1'
  hots[1].style.display = 'none';
  ones[1].className = 'no1'
  hots[2].style.display = 'block';
  ones[2].className = 'no1 on'
  hots[3].style.display = 'none';
  ones[3].className = 'no1'
})
ones[3].addEventListener('mouseover', function (e) {
  hots[0].style.display = 'none';
  ones[0].className = 'no1'
  hots[1].style.display = 'none';
  ones[1].className = 'no1'
  hots[2].style.display = 'none';
  ones[2].className = 'no1'
  hots[3].style.display = 'block';
  ones[3].className = 'no1 on'
})
ones2[0].addEventListener('mouseover', function (e) {
  hots2[0].style.display = 'block';
  ones2[0].className = 'no2 on'
  hots2[1].style.display = 'none';
  ones2[1].className = 'no2'
  hots2[2].style.display = 'none';
  ones2[2].className = 'no2'
  hots2[3].style.display = 'none';
  ones2[3].className = 'no2'
  hots2[4].style.display = 'none';
  ones2[4].className = 'no2'
})
ones2[1].addEventListener('mouseover', function (e) {
  hots2[0].style.display = 'none';
  ones2[0].className = 'no2'
  hots2[1].style.display = 'block';
  ones2[1].className = 'no2 on'
  hots2[2].style.display = 'none';
  ones2[2].className = 'no2'
  hots2[3].style.display = 'none';
  ones2[3].className = 'no2'
  hots2[4].style.display = 'none';
  ones2[4].className = 'no2'
})
ones2[2].addEventListener('mouseover', function (e) {
  hots2[0].style.display = 'none';
  ones2[0].className = 'no2'
  hots2[1].style.display = 'none';
  ones2[1].className = 'no2'
  hots2[2].style.display = 'block';
  ones2[2].className = 'no2 on'
  hots2[3].style.display = 'none';
  ones2[3].className = 'no2'
  hots2[4].style.display = 'none';
  ones2[4].className = 'no2'
})
ones2[3].addEventListener('mouseover', function (e) {
  hots2[0].style.display = 'none';
  ones2[0].className = 'no2'
  hots2[1].style.display = 'none';
  ones2[1].className = 'no2'
  hots2[2].style.display = 'none';
  ones2[2].className = 'no2'
  hots2[3].style.display = 'block';
  ones2[3].className = 'no2 on'
  hots2[4].style.display = 'none';
  ones2[4].className = 'no2'
})
ones2[4].addEventListener('mouseover', function (e) {
  hots2[0].style.display = 'none';
  ones2[0].className = 'no2'
  hots2[1].style.display = 'none';
  ones2[1].className = 'no2'
  hots2[2].style.display = 'none';
  ones2[2].className = 'no2'
  hots2[3].style.display = 'none';
  ones2[3].className = 'no2'
  hots2[4].style.display = 'block';
  ones2[4].className = 'no2 on'
})
ones3[0].addEventListener('mouseover', function (e) {
  hots3[0].style.display = 'block';
  ones3[0].className = 'no3 on'
  hots3[1].style.display = 'none';
  ones3[1].className = 'no3'
  hots3[2].style.display = 'none';
  ones3[2].className = 'no3'
  hots3[3].style.display = 'none';
  ones3[3].className = 'no3'
  hots3[4].style.display = 'none';
  ones3[4].className = 'no3'
})
ones3[1].addEventListener('mouseover', function (e) {
  hots3[0].style.display = 'none';
  ones3[0].className = 'no3'
  hots3[1].style.display = 'block';
  ones3[1].className = 'no3 on'
  hots3[2].style.display = 'none';
  ones3[2].className = 'no3'
  hots3[3].style.display = 'none';
  ones3[3].className = 'no3'
  hots3[4].style.display = 'none';
  ones3[4].className = 'no3'
})
ones3[2].addEventListener('mouseover', function (e) {
  hots3[0].style.display = 'none';
  ones3[0].className = 'no3'
  hots3[1].style.display = 'none';
  ones3[1].className = 'no3'
  hots3[2].style.display = 'block';
  ones3[2].className = 'no3 on'
  hots3[3].style.display = 'none';
  ones3[3].className = 'no3'
  hots3[4].style.display = 'none';
  ones3[4].className = 'no3'
})
ones3[3].addEventListener('mouseover', function (e) {
  hots3[0].style.display = 'none';
  ones3[0].className = 'no3'
  hots3[1].style.display = 'none';
  ones3[1].className = 'no3'
  hots3[2].style.display = 'none';
  ones3[2].className = 'no3'
  hots3[3].style.display = 'block';
  ones3[3].className = 'no3 on'
  hots3[4].style.display = 'none';
  ones3[4].className = 'no3'
})
ones3[4].addEventListener('mouseover', function (e) {
  hots3[0].style.display = 'none';
  ones3[0].className = 'no3'
  hots3[1].style.display = 'none';
  ones3[1].className = 'no3'
  hots3[2].style.display = 'none';
  ones3[2].className = 'no3'
  hots3[3].style.display = 'none';
  ones3[3].className = 'no3'
  hots3[4].style.display = 'block';
  ones3[4].className = 'no3 on'
})
ones4[0].addEventListener('mouseover', function (e) {
  hots4[0].style.display = 'block';
  ones4[0].className = 'no4 on'
  hots4[1].style.display = 'none';
  ones4[1].className = 'no4'
  hots4[2].style.display = 'none';
  ones4[2].className = 'no4'
  hots4[3].style.display = 'none';
  ones4[3].className = 'no4'
  hots4[4].style.display = 'none';
  ones4[4].className = 'no4'
})
ones4[1].addEventListener('mouseover', function (e) {
  hots4[0].style.display = 'none';
  ones4[0].className = 'no4'
  hots4[1].style.display = 'block';
  ones4[1].className = 'no4 on'
  hots4[2].style.display = 'none';
  ones4[2].className = 'no4'
  hots4[3].style.display = 'none';
  ones4[3].className = 'no4'
  hots4[4].style.display = 'none';
  ones4[4].className = 'no4'
})
ones4[2].addEventListener('mouseover', function (e) {
  hots4[0].style.display = 'none';
  ones4[0].className = 'no4'
  hots4[1].style.display = 'none';
  ones4[1].className = 'no4'
  hots4[2].style.display = 'block';
  ones4[2].className = 'no4 on'
  hots4[3].style.display = 'none';
  ones4[3].className = 'no4'
  hots4[4].style.display = 'none';
  ones4[4].className = 'no4'
})
ones4[3].addEventListener('mouseover', function (e) {
  hots4[0].style.display = 'none';
  ones4[0].className = 'no4'
  hots4[1].style.display = 'none';
  ones4[1].className = 'no4'
  hots4[2].style.display = 'none';
  ones4[2].className = 'no4'
  hots4[3].style.display = 'block';
  ones4[3].className = 'no4 on'
  hots4[4].style.display = 'none';
  ones4[4].className = 'no4'
})
ones4[4].addEventListener('mouseover', function (e) {
  hots4[0].style.display = 'none';
  ones4[0].className = 'no4'
  hots4[1].style.display = 'none';
  ones4[1].className = 'no4'
  hots4[2].style.display = 'none';
  ones4[2].className = 'no4'
  hots4[3].style.display = 'none';
  ones4[3].className = 'no4'
  hots4[4].style.display = 'block';
  ones4[4].className = 'no4 on'
})
ones5[0].addEventListener('mouseover', function (e) {
  hots5[0].style.display = 'block';
  ones5[0].className = 'no5 on'
  hots5[1].style.display = 'none';
  ones5[1].className = 'no5'
  hots5[2].style.display = 'none';
  ones5[2].className = 'no5'
})
ones5[1].addEventListener('mouseover', function (e) {
  hots5[0].style.display = 'none';
  ones5[0].className = 'no5'
  hots5[1].style.display = 'block';
  ones5[1].className = 'no5 on'
  hots5[2].style.display = 'none';
  ones5[2].className = 'no5'
})
ones5[2].addEventListener('mouseover', function (e) {
  hots5[0].style.display = 'none';
  ones5[0].className = 'no5'
  hots5[1].style.display = 'none';
  ones5[1].className = 'no5'
  hots5[2].style.display = 'block';
  ones5[2].className = 'no5 on'
})
ones6[0].addEventListener('mouseover', function (e) {
  hots6[0].style.display = 'block';
  ones6[0].className = 'no6 on'
  hots6[1].style.display = 'none';
  ones6[1].className = 'no6'
  hots6[2].style.display = 'none';
  ones6[2].className = 'no6'
  hots6[3].style.display = 'none';
  ones6[3].className = 'no6'
  hots6[4].style.display = 'none';
  ones6[4].className = 'no6'
})
ones6[1].addEventListener('mouseover', function (e) {
  hots6[0].style.display = 'none';
  ones6[0].className = 'no6'
  hots6[1].style.display = 'block';
  ones6[1].className = 'no6 on'
  hots6[2].style.display = 'none';
  ones6[2].className = 'no6'
  hots6[3].style.display = 'none';
  ones6[3].className = 'no6'
  hots6[4].style.display = 'none';
  ones6[4].className = 'no6'
})
ones6[2].addEventListener('mouseover', function (e) {
  hots6[0].style.display = 'none';
  ones6[0].className = 'no6'
  hots6[1].style.display = 'none';
  ones6[1].className = 'no6'
  hots6[2].style.display = 'block';
  ones6[2].className = 'no6 on'
  hots6[3].style.display = 'none';
  ones6[3].className = 'no6'
  hots6[4].style.display = 'none';
  ones6[4].className = 'no6'
})
ones6[3].addEventListener('mouseover', function (e) {
  hots6[0].style.display = 'none';
  ones6[0].className = 'no6'
  hots6[1].style.display = 'none';
  ones6[1].className = 'no6'
  hots6[2].style.display = 'none';
  ones6[2].className = 'no6'
  hots6[3].style.display = 'block';
  ones6[3].className = 'no6 on'
  hots6[4].style.display = 'none';
  ones6[4].className = 'no6'
})
ones6[4].addEventListener('mouseover', function (e) {
  hots6[0].style.display = 'none';
  ones6[0].className = 'no6'
  hots6[1].style.display = 'none';
  ones6[1].className = 'no6'
  hots6[2].style.display = 'none';
  ones6[2].className = 'no6'
  hots6[3].style.display = 'none';
  ones6[3].className = 'no6'
  hots6[4].style.display = 'block';
  ones6[4].className = 'no6 on'
})
// 数据渲染
var dianQi = "";
var dianQi2 = "";
var dianQi3 = "";
// console.log(data.goodData.applianceData.hotreCommend[0].newGood);
// console.log($('.hot').length);
var hotLength = $('.hot').length;
// console.log(hotLength);
data.goodData.applianceData.hotreCommend[0].newGood.forEach(function (e, i) {
  // console.log(e);
  dianQi += `
  <li>
  <div class="p-img">
      <a href="details.html#${e.id}">
          <img src="${e.newImg}"
              alt="">
      </a>
  </div>
  <div class="p-price">
      ${e.price}
  </div>
  <div class="p-name">
      <a href="" title="${e.title}">${e.title}</a>
  </div>
  <a href="" class="p-btn">查看详情</a>
</li>
  `
  $('.hot').eq(0).html(dianQi)
});
data.goodData.applianceData.hotreCommend[0].hotGood.forEach(function (e, i) {
  // console.log(e);
  dianQi2 += `
  <li>
  <div class="p-img">
      <a href="details.html#${e.id}">
          <img src="${e.newImg}"
              alt="">
      </a>
  </div>
  <div class="p-price">
      ${e.price}
  </div>
  <div class="p-name">
      <a href="" title="${e.title}">${e.title}</a>
  </div>
  <a href="" class="p-btn">查看详情</a>
</li>
  `
  $('.hot').eq(1).html(dianQi2)
});
data.goodData.applianceData.hotreCommend[0].niceGood.forEach(function (e, i) {
  // console.log(e);
  dianQi3 += `
  <li>
  <div class="p-img">
      <a href="details.html#${e.id}">
          <img src="${e.newImg}"
              alt="">
      </a>
  </div>
  <div class="p-price">
      ${e.price}
  </div>
  <div class="p-name">
      <a href="" title="${e.title}">${e.title}</a>
  </div>
  <a href="" class="p-btn">查看详情</a>
</li>
  `
  $('.hot').eq(2).html(dianQi3)
});

var pinPai = "";
var pinPai2 = "";
var pinPai3 = "";

// console.log(data.goodData.applianceData.toshiba[0].left.id);
// console.log($('.pin').length);
// var pinLength = $('.pin').length;
// console.log(data.goodData.applianceData.toshiba[0].left);
var leftData = data.goodData.applianceData.toshiba[0].left;
pinPai += `
    <div class="cate-ad">
      <a href="">
        <img src="${leftData.newImg}" alt="">
      </a>
    </div>
  `
$('.pin').eq(0).html(pinPai);

// console.log(data.goodData.applianceData.toshiba[0].mid);
var midData = data.goodData.applianceData.toshiba[0].mid
// console.log(e);
pinPai2 += `
    <a href="">
     <img src="https://x.dscmall.cn/storage/data/afficheimg/1489536055047315446.jpg" width="400"  height="150" alt="">
     </a>
    <a href="">
        <img src="https://x.dscmall.cn/storage/data/afficheimg/1489536074996320080.jpg" width="400"
         height="150" alt="">
    </a>
    `
$('.pin').eq(1).html(pinPai2);

// console.log(data.goodData.applianceData.toshiba[0].right);
var rightData = data.goodData.applianceData.toshiba[0].right
// console.log(e);
pinPai3 += `
    <ul>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072850306019115.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490039286075654490.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072313895957648.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072329183966195.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072384627679069.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072399542595828.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072417755830176.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072746651935979.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072756032175204.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072777790374054.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072787223453617.jpg"
                                    alt=""></a></li>
                        <li><a href=""><img src="https://x.dscmall.cn/storage/data/brandlogo/1490072804442637685.jpg"
                                    alt=""></a></li>
                    </ul>
    `
$('.pin').eq(2).html(pinPai3);

var chuFang = "";
var chuFang2 = "";
var chuFang3 = "";
var chuFang4 = "";
var chuFang5 = "";

// console.log(data.goodData.applianceData.kitChen[0].electric);
data.goodData.applianceData.kitChen[0].electric.forEach(function (e, i) {
  // console.log(e);
  chuFang = `
  <li class="first">
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490175230574.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-info">
                                    <div class="info-name">
                                        <a href=""
                                            title="猫人Joyoung/九阳 Y-50C15电压力锅高压锅正品双胆智能预约5L铁釜新品 土灶铁斧 双重安">猫人Joyoung/九阳
                                            Y-50C15电压力锅高压锅正品双胆智能预约5L铁釜新品 土灶铁斧 双重安</a>
                                    </div>
                                    <div class="info-handle">
                                        <div class="info-price">
                                            ￥379.00
                                        </div>
                                        <a href="" class="info-btn">查看详情</a>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490147066965.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href="" title="小米 米家IH电饭煲 小米智能家用wifi电饭锅3L手机控制 小米专卖店 正品授权">小米 米家IH电饭煲
                                        小米智能家用wifi电饭锅3L手机控制 小米专卖店 正品授权</a>
                                </div>
                                <div class="p-price">
                                    ￥100.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490175189731.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href=""
                                        title="玛克家纺【12期免息】Panasonic/松下 SR-PE401-K 新品可变压力IH电饭煲4L 送豪华大礼">玛克家纺【12期免息】Panasonic/松下
                                        SR-PE401-K 新品可变压力IH电饭煲4L 送豪华大礼</a>
                                </div>
                                <div class="p-price">
                                    ￥2299.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201809/thumb_img/0_thumb_G_1536546120383.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href=""
                                        title="九阳豆浆机家用全自动多功能智能预约官方旗舰店3-4-5人免滤D268">九阳豆浆机家用全自动多功能智能预约官方旗舰店3-4-5人免滤D268</a>
                                </div>
                                <div class="p-price">
                                    ￥499.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201809/thumb_img/0_thumb_G_1536547161072.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href="" title="Galanz/格兰仕 P70F23P-G5(SO)机械式家用微波炉">Galanz/格兰仕
                                        P70F23P-G5(SO)机械式家用微波炉</a>
                                </div>
                                <div class="p-price">
                                    ￥399.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490209720209.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href=""
                                        title="飞科美的智能家用多功能双胆电压力锅高压锅饭煲正品WCS5025 5L小家电 5L双胆 智能预约 大面板">飞科美的智能家用多功能双胆电压力锅高压锅饭煲正品WCS5025
                                        5L小家电 5L双胆 智能预约 大面板</a>
                                </div>
                                <div class="p-price">
                                    ￥249.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490209690294.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href=""
                                        title="飞利浦TOSOT/大松 GDF-2001C格力电饭煲迷你智能全自动家用 电饭锅1-2人 格力出品 数码显示 智能预约 全国包邮">飞利浦TOSOT/大松
                                        GDF-2001C格力电饭煲迷你智能全自动家用 电饭锅1-2人 格力出品 数码显示 智能预约 全国包邮</a>
                                </div>
                                <div class="p-price">
                                    ￥388.00
                                </div>
                            </li>
  `
  $('.hot2').eq(0).html(chuFang)
});

var soyData = data.goodData.applianceData.kitChen[0].soybean
var chuFang3 = `
<li class="first">
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490175230574.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-info">
                                    <div class="info-name">
                                        <a href=""
                                            title="猫人Joyoung/九阳 Y-50C15电压力锅高压锅正品双胆智能预约5L铁釜新品 土灶铁斧 双重安">猫人Joyoung/九阳
                                            Y-50C15电压力锅高压锅正品双胆智能预约5L铁釜新品 土灶铁斧 双重安</a>
                                    </div>
                                    <div class="info-handle">
                                        <div class="info-price">
                                            ￥379.00
                                        </div>
                                        <a href="" class="info-btn">查看详情</a>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490147066965.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href="" title="小米 米家IH电饭煲 小米智能家用wifi电饭锅3L手机控制 小米专卖店 正品授权">小米 米家IH电饭煲
                                        小米智能家用wifi电饭锅3L手机控制 小米专卖店 正品授权</a>
                                </div>
                                <div class="p-price">
                                    ￥100.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490175189731.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href=""
                                        title="玛克家纺【12期免息】Panasonic/松下 SR-PE401-K 新品可变压力IH电饭煲4L 送豪华大礼">玛克家纺【12期免息】Panasonic/松下
                                        SR-PE401-K 新品可变压力IH电饭煲4L 送豪华大礼</a>
                                </div>
                                <div class="p-price">
                                    ￥2299.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201809/thumb_img/0_thumb_G_1536546120383.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href=""
                                        title="九阳豆浆机家用全自动多功能智能预约官方旗舰店3-4-5人免滤D268">九阳豆浆机家用全自动多功能智能预约官方旗舰店3-4-5人免滤D268</a>
                                </div>
                                <div class="p-price">
                                    ￥499.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201809/thumb_img/0_thumb_G_1536547161072.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href="" title="Galanz/格兰仕 P70F23P-G5(SO)机械式家用微波炉">Galanz/格兰仕
                                        P70F23P-G5(SO)机械式家用微波炉</a>
                                </div>
                                <div class="p-price">
                                    ￥399.00
                                </div>
                            </li>
`
$('.hot2').eq(2).html(chuFang3);

var breadData=data.goodData.applianceData.kitChen[0].bread
  // console.log(e);
  chuFang4 = `
  <li class="first">
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490175230574.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-info">
                                    <div class="info-name">
                                        <a href=""
                                            title="猫人Joyoung/九阳 Y-50C15电压力锅高压锅正品双胆智能预约5L铁釜新品 土灶铁斧 双重安">猫人Joyoung/九阳
                                            Y-50C15电压力锅高压锅正品双胆智能预约5L铁釜新品 土灶铁斧 双重安</a>
                                    </div>
                                    <div class="info-handle">
                                        <div class="info-price">
                                            ￥379.00
                                        </div>
                                        <a href="" class="info-btn">查看详情</a>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490147066965.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href="" title="小米 米家IH电饭煲 小米智能家用wifi电饭锅3L手机控制 小米专卖店 正品授权">小米 米家IH电饭煲
                                        小米智能家用wifi电饭锅3L手机控制 小米专卖店 正品授权</a>
                                </div>
                                <div class="p-price">
                                    ￥100.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490175189731.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href=""
                                        title="玛克家纺【12期免息】Panasonic/松下 SR-PE401-K 新品可变压力IH电饭煲4L 送豪华大礼">玛克家纺【12期免息】Panasonic/松下
                                        SR-PE401-K 新品可变压力IH电饭煲4L 送豪华大礼</a>
                                </div>
                                <div class="p-price">
                                    ￥2299.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201809/thumb_img/0_thumb_G_1536546120383.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href=""
                                        title="九阳豆浆机家用全自动多功能智能预约官方旗舰店3-4-5人免滤D268">九阳豆浆机家用全自动多功能智能预约官方旗舰店3-4-5人免滤D268</a>
                                </div>
                                <div class="p-price">
                                    ￥499.00
                                </div>
                            </li>
                            <li>
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201809/thumb_img/0_thumb_G_1536547161072.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-name">
                                    <a href="" title="Galanz/格兰仕 P70F23P-G5(SO)机械式家用微波炉">Galanz/格兰仕
                                        P70F23P-G5(SO)机械式家用微波炉</a>
                                </div>
                                <div class="p-price">
                                    ￥399.00
                                </div>
                            </li>
  `
  $('.hot2').eq(3).html(chuFang4)

  var coffeeData=data.goodData.applianceData.kitChen[0].coffee
  // console.log(e);
  chuFang5 = `
  <li class="first">
                                <div class="p-img">
                                    <a href="">
                                        <img src="https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1490175230574.jpg"
                                            alt="">
                                    </a>
                                </div>
                                <div class="p-info">
                                    <div class="info-name">
                                        <a href=""
                                            title="猫人Joyoung/九阳 Y-50C15电压力锅高压锅正品双胆智能预约5L铁釜新品 土灶铁斧 双重安">猫人Joyoung/九阳
                                            Y-50C15电压力锅高压锅正品双胆智能预约5L铁釜新品 土灶铁斧 双重安</a>
                                    </div>
                                    <div class="info-handle">
                                        <div class="info-price">
                                            ￥379.00
                                        </div>
                                        <a href="" class="info-btn">查看详情</a>
                                    </div>
                                </div>
                            </li>
  `
  $('.hot2').eq(4).html(chuFang5)

var daDian = "";
var daDian2 = "";
var daDian3 = "";
var daDian4 = "";
var daDian5 = "";

data.goodData.applianceData.major[0].slab.forEach(function (e, i) {
  // console.log(e);
  daDian = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${e.id}">
          <img src="${e.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${e.title}">${e.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot3').eq(0).html(daDian)
});
var airData=data.goodData.applianceData.major[0].air
  // console.log(e);
  daDian2 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${airData.id}">
          <img src="${airData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${airData.title}">${airData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot3').eq(1).html(daDian2)

var refData=data.goodData.applianceData.major[0].refrigerator
  // console.log(e);
  daDian3 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${refData.id}">
          <img src="${refData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${refData.title}">${refData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot3').eq(2).html(daDian3)
data.goodData.applianceData.major[0].washer.forEach(function (e, i) {
  // console.log(e);
  daDian4 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${e.id}">
          <img src="${e.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${e.title}">${e.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot3').eq(3).html(daDian4)
});
var famData=data.goodData.applianceData.major[0].familyCinema
  // console.log(e);
  daDian5 = `
  `
  $('.hot3').eq(4).html(daDian5)
  
var geHu = "";
var geHu2 = "";
var geHu3 = "";
var geHu4 = "";
var geHu5 = "";

data.goodData.applianceData.individual[0].massage.forEach(function (e, i) {
  // console.log(e);
  geHu = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${e.id}">
          <img src="${e.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${e.title}">${e.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot4').eq(0).html(geHu)
});
var razorData=data.goodData.applianceData.individual[0].razor
  // console.log(e);
  geHu2 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${razorData.id}">
          <img src="${razorData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${razorData.title}">${razorData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot4').eq(1).html(geHu2)

var graData=data.goodData.applianceData.individual[0].grainer
  // console.log(e);
  geHu3 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${graData.id}">
          <img src="${graData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${graData.title}">${graData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot4').eq(2).html(geHu3)
var oraData=data.goodData.applianceData.individual[0].oralCare
  // console.log(e);
  geHu4 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${oraData.id}">
          <img src="${oraData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${oraData.title}">${oraData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot4').eq(3).html(geHu4)
var hairData=data.goodData.applianceData.individual[0].hairClipper
  // console.log(e);
  geHu5 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${hairData.id}">
          <img src="${hairData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${hairData.title}">${hairData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot4').eq(4).html(geHu5)

var wuJin = "";
var wuJin2 = "";
var wuJin3 = "";
data.goodData.applianceData.decoration[0].electricTool.forEach(function (e, i) {
  // console.log(e);
  wuJin = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${e.id}">
          <img src="${e.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${e.title}">${e.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot5').eq(0).html(wuJin)
});
var metData=data.goodData.applianceData.decoration[0].meter
  // console.log(e);
  wuJin2 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${metData.id}">
          <img src="${metData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${metData.title}">${metData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot5').eq(1).html(wuJin2)

var chaData=data.goodData.applianceData.decoration[0].channel
  // console.log(e);
  wuJin3 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${chaData.id}">
          <img src="${chaData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${chaData.title}">${chaData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot5').eq(2).html(wuJin3)

var sHuo = "";
var sHuo2 = "";
var sHuo3 = "";
var sHuo4 = "";
var sHuo5 = "";

data.goodData.applianceData.domestic[0].electricFan.forEach(function (e, i) {
  // console.log(e);
  sHuo = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${e.id}">
          <img src="${e.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${e.title}">${e.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot6').eq(0).html(sHuo)
});
var tmtData=data.goodData.applianceData.domestic[0].thermantidote
  // console.log(e);
  sHuo2 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${tmtData.id}">
          <img src="${tmtData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${tmtData.title}">${tmtData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot6').eq(1).html(sHuo2)

var purData=data.goodData.applianceData.domestic[0].purifier
  // console.log(e);
  sHuo3 = `
  `
  $('.hot6').eq(2).html(sHuo3)
var humData=data.goodData.applianceData.domestic[0].humidifier
  // console.log(e);
  sHuo4 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${humData.id}">
          <img src="${humData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${humData.title}">${humData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot6').eq(3).html(sHuo4)
var roomData=data.goodData.applianceData.domestic[0].roomba
  // console.log(e);
  sHuo5 = `
  <li class="first">
  <div class="p-img">
      <a href="details.html#${roomData.id}">
          <img src="${roomData.img}"
              alt="">
      </a>
  </div>
  <div class="p-info">
      <div class="info-name">
          <a href="" title="${roomData.title}">${roomData.title}</a>
      </div>
      <div class="info-handle">
          <div class="info-price">
              ￥2399.00
          </div>
          <a href="" class="info-btn">查看详情</a>
      </div>
  </div>
</li>
  `
  $('.hot6').eq(4).html(sHuo5);

  
